import request from '@/utils/request'

export const CartService = {
  getCartItems() {
    return request.get('/api/cart')
  },
  
  addToCart(productId: number, quantity: number) {
    return request.post('/api/cart', { productId, quantity })
  },
  
  updateCartItem(id: number, quantity: number) {
    return request.put(`/api/cart/${id}`, { quantity })
  },
  
  removeCartItem(id: number) {
    return request.delete(`/api/cart/${id}`)
  }
} 